import urllib2

from bs4 import BeautifulSoup


def download(url):
    huaban = urllib2.urlopen(url)
    html = huaban.read()
    image_holder = soup.find('div', attrs={'class': 'image-holder'})
    f = open('1.txt', 'w')
    f.write(html)
    f.close()
    target = 'http://img.hb.aicdn.com/a911239f526c61098291e88754e70bfe90d1801b11cdc-MitOz7_fw658'

if __name__=='__main__':
    download('http://huaban.com/pins/235009587/')
